//定义一些变量
var tab1 = '<li onclick="details(this)" title="';
var tab3 = '" class="layui-col-sm12 layui-col-md6"><div class="fly-extend-list layui-card" style="background-image: url(';
var tab2 = ');"></div></li>';
var tab4 = '<div style="background-image: url(';
var tab5 = ')" class="layui-this"><div></div></div>';


var html1 = '<!DOCTYPE html>\n' +
    '<html lang="en">\n' +
    '<head>\n' +
    '    <meta charset="UTF-8">\n' +
    '    <link rel="stylesheet" href="/css/jigsaw.css">\n' +
    '</head>\n' +
    '<body>\n' +
    '\n' +
    '<div class="container" style="margin-top: 15px;">\n' +
    '    <div id="captcha" style="position: relative"></div>\n' +
    '</div>\n' +
    '\n' +
    '<script type="text/javascript" src="/js/jigsaw.js"></script>\n' +
    '<script type="text/javascript">\n' +
    '    jigsaw.init(document.getElementById(\'captcha\'), function () {\n' +
    '        zip();\n' +
    '    })\n' +
    '</script>\n' +
    '</body>\n' +
    '</html>';

function buildHtml(name,url) {
    return tab1+name+tab3+"'"+url+"'"+tab2;
}

function buildHtml2(url) {
    return tab4+url+tab5;
}